package cn.alpha.intell.rbtlib.view.widget.textview.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import cn.alpha.intell.rbtlib.R;


public class ScreenLightTextView extends TextView{
    public ScreenLightTextView(Context context) {
        super(context);
    }

    public ScreenLightTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ScreenLightTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        //setTypeface();
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }


    public void setSelected(boolean selected){
        if (selected){
            this.setBackgroundColor(getResources().getColor(R.color.color_4684ff));
            this.setTextColor(getResources().getColor(R.color.white));
        }else {
            this.setBackgroundColor(getResources().getColor(R.color.white));
            this.setTextColor(getResources().getColor(R.color.black));
        }
    }
}
